package com.admin.service;

import java.util.List;
import java.util.Map;

import com.admin.domain.RoleDO;
import com.admin.vo.PageVO;
import com.admin.vo.ResultVO;
import com.admin.vo.SimpleResultVO;
import com.admin.vo.system.ListRoleVO;
import com.admin.vo.system.RoleSelectedVO;

import javax.management.relation.Role;

/**
 * 角色service
 * 
 * @author ZY
 * @date 2018/09/30
 */
public interface RoleService extends BaseService<RoleDO> {

    RoleDO findRoleLevelByUserId(Integer userId);

    String findByUserId(Integer userId);

    /**
     * 
     * @param roleIds
     * @return
     */
    public SimpleResultVO deleteByPrimaryKeys(List<Long> roleIds);

    /**
     * 
     * @param roleId
     * @return
     */
    public SimpleResultVO deleteByPrimaryKey(Long roleId);

    /**
     * 
     * @param pageIndex
     * @param pageSize
     * @param params
     * @return
     */
    public ResultVO<PageVO<ListRoleVO>> getPageList(Integer pageIndex, Integer pageSize, Map<String, Object> params);

    /**
     * 查供筛选的角色
     *
     * @return
     */
    public ResultVO<List<RoleSelectedVO>> getSelectRoles();

    /**
     * 查供筛选的角色
     * @param businessAreaIds
     * @return
     */
    ResultVO<List<RoleSelectedVO>> getSelectRolesByAreaId(String businessAreaIds, Integer type, Integer userId);

    /**
     * 查供筛选的角色
     * 
     * @param userId
     * @return
     */
    public ResultVO<List<RoleSelectedVO>> getSelectRoles(Integer userId);

    /**
     * 新增角色
     * 
     * @param roleDO
     * @param menuIds
     * @return
     */
    public SimpleResultVO saveRoleDO(RoleDO roleDO, List<Long> menuIds);

    /**
     * 修改角色
     * 
     * @param roleDO
     * @param menuIds
     * @return
     */
    public SimpleResultVO upateRoleDO(RoleDO roleDO, List<Long> menuIds);

}
